import axiosInstance from '@/utils/request'





/**
 * 登录接口
 * @param {*} username 
 * @param {*} password 
 * @returns 
 */
export const RequestLogin = (username:any,password:number):Promise<any> => {
    return axiosInstance({
        method: 'post',
        url: '/api/member/login',
        //post请求参数使用data选项, get参数 params选项
        data: {
            username,
            password,
        },
    })
}
 
/**
 * 注册账号
 * 
 */
export const RequestAddGoods = (username:string,password:string,nick:string):Promise<any> =>{
    
    return axiosInstance({
        method:'post',
        url:'/api/member/add',
     
        data:{
            username,
            password,
            nick,
        }
    })
}
